<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<title>js点赞效果</title>
<style>
a{color:#000}
</style>
<script src="./js/jquery-1.8.0.js"></script>
<body>
<a class="zhan" href="#">赞(<span>0</span>)</a>
<body>
<html>
<script>

      $('a.zhan').one('click',function(){
            var left = parseInt($(this).offset().left)+10, top =  parseInt($(this).offset().top)-10, obj=$(this);
                $(this).append('<div id="zhan"><b>+1<\/b></div>');
                $('#zhan').css({'position':'absolute','z-index':'1','left':left+'px','top':top+'px'}).animate({top:top-10,left:left+10},'slow',function(){
                    $(this).fadeIn('fast').remove();
                    var Num = parseInt(obj.find('span').text());
                    Num++;
                    obj.find('span').text(Num);
                });
                return false;
            });

</script>